#ifndef __MANAGER_ADAPER_HPP__
#define __MANAGER_ADAPER_HPP__

#include "stdafx.h"
#include "selector.hpp"
#include "parameters.hpp"

// The mode for parsing parameters
#define DAEMON_MODE 0
#define MANUAL_MODE 1

class manager_adapter:public selector_item {

public:
	BOOL state;
	// communicate with manager through STDIO
	STUBPARAM params;
public:
/*
* Here we use the c_style method to unserializtion 
* the data received from network
*/
	manager_adapter();
	manager_adapter( int fd);
	~manager_adapter();
	BOOL is_manager_quit();
	void quit();
	int action( int arg0 , void * arg1 );
	BOOL get_params( );
};

void pipe_thread( unsigned long arg0, unsigned long arg1 );

#endif
